class HeroHelper {
    private static instance = new HeroHelper();
    private constructor() { }
    static getInstance(): HeroHelper {
        if (!HeroHelper.instance) {
            HeroHelper.instance = new HeroHelper()
        }
        return this.instance
    }
    cameraPosition: any = new cc.Vec2(0, 0);//主摄像机坐标
    isFootCollider: boolean = false;
    isWayCollider: boolean = false;
    uuidFootCollider: string = null;
    uuidWayCollider: string = null;
    widthScene: number = 0;//场景宽度

    private heroWorldP: cc.Vec2 = new cc.Vec2(0, 0);
    private camarePositionX: number = 0;
    SetWorldPosition(postion: cc.Vec2) {
        this.heroWorldP = postion;
    }
    GetWorldPosition() {
        return this.heroWorldP.clone();
    }
    SetCamareX(postion: number) {
        this.camarePositionX = postion;
    }
    GetCamareX() {
        return this.camarePositionX;
    }
}
(<any>window).HeroHelper = HeroHelper;
